﻿
namespace Indeco.G24.Windows.Forms
{
	/// <summary>
	/// abstract DiaBan typed datagridview
	/// </summary>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class DiaBanDataGridViewBase : System.Windows.Forms.UserControl
	{	
		/// <summary> 
		/// Thrown when the current Entity changed.
		/// </summary>
		public event System.EventHandler<DiaBanDataGridViewEventArgs> CurrentEntityChanged;
		
		#region Fields
				
		/// <summary> 
		/// the current entity.
		/// </summary>
		private Entities.DiaBan _currentDiaBan = null;
		//private Dictionary<string, string> _columnsHeaders = new Dictionary<string, string>();
		
		/// <summary> 
		/// the datagridview instance
		/// </summary>
		protected System.Windows.Forms.DataGridView uxDiaBanDataGridView;
		
		/// <summary> 
		/// the errorprovider
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxDiaBanErrorProvider;
		
		/// <summary> 
		/// the bindingsource
		/// </summary>
		protected System.Windows.Forms.BindingSource uxDiaBanBindingSource;
		
		
		/// <summary> 
		/// the DGV column associated with the IDDiaBan property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIDDiaBanDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the IDDiaBanCha property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIDDiaBanChaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the MaDiaBan property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxMaDiaBanDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Ten property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxTenDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Mota property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxMotaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the HinhMinhHoa property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxHinhMinhHoaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the MaVung property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxMaVungDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the MacDinh property
		/// </summary>
		protected System.Windows.Forms.DataGridViewCheckBoxColumn uxMacDinhDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the TrangThai property
		/// </summary>
		protected System.Windows.Forms.DataGridViewCheckBoxColumn uxTrangThaiDataGridViewColumn;
		
		#endregion
					
		#region Combo list
		
		#endregion
		
		#region Main Datasource
		
		private Entities.TList<Entities.DiaBan> _DiaBanList;
				
		/// <summary> 
		/// The list of DiaBan to be displayed in the DGV.
		/// </summary>
		[System.ComponentModel.Category("Data")]
		public Entities.TList<Entities.DiaBan> DiaBanList
		{
			get {return this._DiaBanList;}
			set
			{
				this._DiaBanList = value;
				this.uxDiaBanBindingSource.DataSource = null;
				this.uxDiaBanBindingSource.DataSource = value;
				this.uxDiaBanDataGridView.DataSource = null;
				this.uxDiaBanDataGridView.DataSource = this.uxDiaBanBindingSource;				
				//this.uxDiaBanBindingSource.ListChanged += new System.ComponentModel.ListChangedEventHandler(uxDiaBanBindingSource_ListChanged);
				this.uxDiaBanBindingSource.CurrentItemChanged += new System.EventHandler(OnDiaBanBindingSourceCurrentItemChanged);
			}
		}
		
		private void OnDiaBanBindingSourceCurrentItemChanged(object sender, System.EventArgs e)
		{
			_currentDiaBan = uxDiaBanBindingSource.Current as Entities.DiaBan;
			
			if (_currentDiaBan != null)
			{
				_currentDiaBan.Validate();
			}
			//_DiaBan.Validate();
			OnCurrentEntityChanged();
		}

		//void uxDiaBanBindingSource_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
		//{
			//throw new Exception("The method or operation is not implemented.");
		//}		
		
		#endregion
		
		/// <summary>
		/// Gets the currently selected <c cref="Entities.DiaBan"/> instance.
		/// </summary>
		public Entities.DiaBan SelectedDiaBan
		{
			get {return this._currentDiaBan;}
		}
		
		#region other properties
		
		/// <summary>
		/// Gets or sets a value indicating whether you have provided your own data-management operations for the DataGridView control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool VirtualMode
		{
			get {return this.uxDiaBanDataGridView.VirtualMode;}
			set
			{
				this.uxDiaBanDataGridView.VirtualMode = value;
			}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the option to add rows is displayed to the user.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToAddRows
		{
			get {return this.uxDiaBanDataGridView.AllowUserToAddRows;}
			set {this.uxDiaBanDataGridView.AllowUserToAddRows = value;}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the user is allowed to delete rows from the DataGridView.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToDeleteRows
		{
			get {return this.uxDiaBanDataGridView.AllowUserToDeleteRows;}
			set {this.uxDiaBanDataGridView.AllowUserToDeleteRows = value;}
		}
		
		/// <summary>
		/// Gets the <c cref="DataGridView"/> instance.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public System.Windows.Forms.DataGridView DataGridView
		{
			get {return this.uxDiaBanDataGridView;}
		}
		
		/// <summary>
		/// Gets a collection that contains all the columns in the control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]		
		[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
		//[System.ComponentModel.EditorAttribute("System.Windows.Forms.Design.DataGridViewColumnCollectionEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor))] 
		public System.Windows.Forms.DataGridViewColumnCollection Columns
		{
			get { return this.uxDiaBanDataGridView.Columns; }
		}
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;
	
		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	
		#region Constructor
	
		/// <summary>
		/// Initializes a new instance of the <see cref="DiaBanDataGridViewBase"/> class.
		/// </summary>
		public DiaBanDataGridViewBase()
		{			
			this.components = new System.ComponentModel.Container();			
			
			this.uxDiaBanDataGridView = new System.Windows.Forms.DataGridView();
			this.uxDiaBanBindingSource = new System.Windows.Forms.BindingSource(this.components);
			this.uxDiaBanErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxIDDiaBanDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDDiaBanChaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxMaDiaBanDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxTenDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxMotaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxHinhMinhHoaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxMaVungDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxMacDinhDataGridViewColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
			this.uxTrangThaiDataGridViewColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
			((System.ComponentModel.ISupportInitialize)(this.uxDiaBanDataGridView)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxDiaBanBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxDiaBanErrorProvider)).BeginInit();
			this.SuspendLayout();
						
			// 
			// uxDiaBanErrorProvider
			// 
			this.uxDiaBanErrorProvider.ContainerControl = this;
			this.uxDiaBanErrorProvider.DataSource = this.uxDiaBanBindingSource;						
			// 
			// uxDiaBanDataGridView
			// 
			this.uxDiaBanDataGridView.AutoGenerateColumns = false;
			this.uxDiaBanDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.uxDiaBanDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
		this.uxIDDiaBanDataGridViewColumn,
		this.uxIDDiaBanChaDataGridViewColumn,
		this.uxMaDiaBanDataGridViewColumn,
		this.uxTenDataGridViewColumn,
		this.uxMotaDataGridViewColumn,
		this.uxHinhMinhHoaDataGridViewColumn,
		this.uxMaVungDataGridViewColumn,
		this.uxMacDinhDataGridViewColumn,
		this.uxTrangThaiDataGridViewColumn			});
			this.uxDiaBanDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
			this.uxDiaBanDataGridView.Location = new System.Drawing.Point(0, 0);
			this.uxDiaBanDataGridView.Name = "uxDiaBanDataGridView";
			this.uxDiaBanDataGridView.Size = new System.Drawing.Size(470, 300);
			this.uxDiaBanDataGridView.TabIndex = 0;	
			this.uxDiaBanDataGridView.BackgroundColor = System.Drawing.Color.WhiteSmoke;
			this.uxDiaBanDataGridView.EnableHeadersVisualStyles = false;
			this.uxDiaBanDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.OnDiaBanDataGridViewDataError);
			this.uxDiaBanDataGridView.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnDiaBanDataGridViewCellValueNeeded);
			this.uxDiaBanDataGridView.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnDiaBanDataGridViewCellValuePushed);
			
			//
			// uxIDDiaBanDataGridViewColumn
			//
			this.uxIDDiaBanDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDDiaBanDataGridViewColumn.DataPropertyName = "IDDiaBan";
			this.uxIDDiaBanDataGridViewColumn.HeaderText = "IDDiaBan";
			this.uxIDDiaBanDataGridViewColumn.Name = "uxIDDiaBanDataGridViewColumn";
			this.uxIDDiaBanDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDDiaBanDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDDiaBanDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDDiaBanChaDataGridViewColumn
			//
			this.uxIDDiaBanChaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDDiaBanChaDataGridViewColumn.DataPropertyName = "IDDiaBanCha";
			this.uxIDDiaBanChaDataGridViewColumn.HeaderText = "IDDiaBanCha";
			this.uxIDDiaBanChaDataGridViewColumn.Name = "uxIDDiaBanChaDataGridViewColumn";
			this.uxIDDiaBanChaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDDiaBanChaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDDiaBanChaDataGridViewColumn.ReadOnly = false;		
			//
			// uxMaDiaBanDataGridViewColumn
			//
			this.uxMaDiaBanDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxMaDiaBanDataGridViewColumn.DataPropertyName = "MaDiaBan";
			this.uxMaDiaBanDataGridViewColumn.HeaderText = "MaDiaBan";
			this.uxMaDiaBanDataGridViewColumn.Name = "uxMaDiaBanDataGridViewColumn";
			this.uxMaDiaBanDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxMaDiaBanDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxMaDiaBanDataGridViewColumn.ReadOnly = false;		
			//
			// uxTenDataGridViewColumn
			//
			this.uxTenDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxTenDataGridViewColumn.DataPropertyName = "Ten";
			this.uxTenDataGridViewColumn.HeaderText = "Ten";
			this.uxTenDataGridViewColumn.Name = "uxTenDataGridViewColumn";
			this.uxTenDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxTenDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxTenDataGridViewColumn.ReadOnly = false;		
			//
			// uxMotaDataGridViewColumn
			//
			this.uxMotaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxMotaDataGridViewColumn.DataPropertyName = "Mota";
			this.uxMotaDataGridViewColumn.HeaderText = "Mota";
			this.uxMotaDataGridViewColumn.Name = "uxMotaDataGridViewColumn";
			this.uxMotaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxMotaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxMotaDataGridViewColumn.ReadOnly = false;		
			//
			// uxHinhMinhHoaDataGridViewColumn
			//
			this.uxHinhMinhHoaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxHinhMinhHoaDataGridViewColumn.DataPropertyName = "HinhMinhHoa";
			this.uxHinhMinhHoaDataGridViewColumn.HeaderText = "HinhMinhHoa";
			this.uxHinhMinhHoaDataGridViewColumn.Name = "uxHinhMinhHoaDataGridViewColumn";
			this.uxHinhMinhHoaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxHinhMinhHoaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxHinhMinhHoaDataGridViewColumn.ReadOnly = false;		
			//
			// uxMaVungDataGridViewColumn
			//
			this.uxMaVungDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxMaVungDataGridViewColumn.DataPropertyName = "MaVung";
			this.uxMaVungDataGridViewColumn.HeaderText = "MaVung";
			this.uxMaVungDataGridViewColumn.Name = "uxMaVungDataGridViewColumn";
			this.uxMaVungDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxMaVungDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxMaVungDataGridViewColumn.ReadOnly = false;		
			//
			// uxMacDinhDataGridViewColumn
			//
			this.uxMacDinhDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxMacDinhDataGridViewColumn.DataPropertyName = "MacDinh";
			this.uxMacDinhDataGridViewColumn.HeaderText = "MacDinh";
			this.uxMacDinhDataGridViewColumn.Name = "uxMacDinhDataGridViewColumn";
			this.uxMacDinhDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxMacDinhDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxMacDinhDataGridViewColumn.ReadOnly = false;		
			//
			// uxTrangThaiDataGridViewColumn
			//
			this.uxTrangThaiDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxTrangThaiDataGridViewColumn.DataPropertyName = "TrangThai";
			this.uxTrangThaiDataGridViewColumn.HeaderText = "TrangThai";
			this.uxTrangThaiDataGridViewColumn.Name = "uxTrangThaiDataGridViewColumn";
			this.uxTrangThaiDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxTrangThaiDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxTrangThaiDataGridViewColumn.ReadOnly = false;		
			
			// this
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.Controls.Add(this.uxDiaBanDataGridView);
			this.Name = "DiaBanDataGridView";
			this.Size = new System.Drawing.Size(470, 300);
			((System.ComponentModel.ISupportInitialize)(this.uxDiaBanErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxDiaBanDataGridView)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxDiaBanBindingSource)).EndInit();
			this.ResumeLayout(false);
		}
		#endregion
				
		#region events
		
		/// <summary>
		/// Raised the CurrentEntityChanged event.
		/// </summary>
		protected void OnCurrentEntityChanged()
		{
			if (CurrentEntityChanged != null)
			{
				DiaBanDataGridViewEventArgs args = new DiaBanDataGridViewEventArgs();
				args.DiaBan = _currentDiaBan;
				CurrentEntityChanged(this, args); 
			}
		}
		
		#endregion
		
		/// <summary>
		/// Strongly typed event 
		/// </summary>
		public class DiaBanDataGridViewEventArgs : System.EventArgs
		{
			private Entities.DiaBan	_DiaBan;
	
			/// <summary>
			/// the  Entities.DiaBan instance.
			/// </summary>
			public Entities.DiaBan DiaBan
			{
				get { return _DiaBan; }
				set { _DiaBan = value; }
			}	
		}
		
		/// <summary>
		/// Handles the DataError event of the uxDiaBanDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewDataErrorEventArgs"/> instance containing the event data.</param>
		protected void OnDiaBanDataGridViewDataError(object sender, System.Windows.Forms.DataGridViewDataErrorEventArgs e)
		{
			System.Diagnostics.Debug.WriteLine(string.Format( "{0}, {1}", e.ColumnIndex, e.RowIndex));
		}
		
		/// <summary>
		/// Handles the CellValueNeeded event of the uxDiaBanDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnDiaBanDataGridViewCellValueNeeded(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxDiaBanDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDiaBanDataGridViewColumn":
						e.Value = DiaBanList[e.RowIndex].IDDiaBan;
						break;
					case "uxIDDiaBanChaDataGridViewColumn":
						e.Value = DiaBanList[e.RowIndex].IDDiaBanCha;
						break;
					case "uxMaDiaBanDataGridViewColumn":
						e.Value = DiaBanList[e.RowIndex].MaDiaBan;
						break;
					case "uxTenDataGridViewColumn":
						e.Value = DiaBanList[e.RowIndex].Ten;
						break;
					case "uxMotaDataGridViewColumn":
						e.Value = DiaBanList[e.RowIndex].Mota;
						break;
					case "uxHinhMinhHoaDataGridViewColumn":
						e.Value = DiaBanList[e.RowIndex].HinhMinhHoa;
						break;
					case "uxMaVungDataGridViewColumn":
						e.Value = DiaBanList[e.RowIndex].MaVung;
						break;
					case "uxMacDinhDataGridViewColumn":
						e.Value = DiaBanList[e.RowIndex].MacDinh;
						break;
					case "uxTrangThaiDataGridViewColumn":
						e.Value = DiaBanList[e.RowIndex].TrangThai;
						break;
				default:
				break;
			}
		}
		
		/// <summary>
		/// Handles the CellValuePushed event of the uxDiaBanDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnDiaBanDataGridViewCellValuePushed(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxDiaBanDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDiaBanDataGridViewColumn":
						DiaBanList[e.RowIndex].IDDiaBan = (System.Guid)e.Value;
						break;
					case "uxIDDiaBanChaDataGridViewColumn":
						DiaBanList[e.RowIndex].IDDiaBanCha = (System.Guid)e.Value;
						break;
					case "uxMaDiaBanDataGridViewColumn":
						DiaBanList[e.RowIndex].MaDiaBan = (System.String)e.Value;
						break;
					case "uxTenDataGridViewColumn":
						DiaBanList[e.RowIndex].Ten = (System.String)e.Value;
						break;
					case "uxMotaDataGridViewColumn":
						DiaBanList[e.RowIndex].Mota = (System.String)e.Value;
						break;
					case "uxHinhMinhHoaDataGridViewColumn":
						DiaBanList[e.RowIndex].HinhMinhHoa = (System.String)e.Value;
						break;
					case "uxMaVungDataGridViewColumn":
						DiaBanList[e.RowIndex].MaVung = (System.String)e.Value;
						break;
					case "uxMacDinhDataGridViewColumn":
						DiaBanList[e.RowIndex].MacDinh = (System.Boolean)e.Value;
						break;
					case "uxTrangThaiDataGridViewColumn":
						DiaBanList[e.RowIndex].TrangThai = (System.Boolean)e.Value;
						break;
				default:
				break;
			}
		}
	}
}
